package com.qinglei.recoup.system.pojo;

import com.qinglei.recoup.common.domain.RegexpConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

@ApiModel(description = "添加用户参数")
@Data
public class AddUserParam implements Serializable {

    @NotBlank(message = "姓名不可为空")
//    @Pattern(regexp = RegexpConstant.NAME_REG, message = "{name}")
    @Size(max = 8, message = "{noMoreThan}")
    @ApiModelProperty(value = "姓名")
    private String name;

    @Pattern(regexp = RegexpConstant.MOBILE_REG, message = "{mobile}")
    @ApiModelProperty(value = "手机号")
    private String mobile;

    @NotBlank(message = "密码不可为空")
    @Size(max = 16, min = 6, message = "{range}")
    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "角色Id 目前 管理员-1 院长-2 护工-3")
    private String roleId;
}
